home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 4
/
Apprentice-Release4.iso
/
Utilities
/
Programming
/
EnterAct 3.5
/
Drag_on Modules
/
hAWK example progs
/
$CcommentsToAWK
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1994-01-26
|
358 b
|
27 lines
|
[
TEXT/KEEN
]
#$CcommentsToAWK: convert simple C comments to # comments
#Only one comment can start or end on a line
{
if ($0 ~ /^\/\*/)
{
if ($0 ~ /\*\//) #one line comment
{
sub(/^\/\*/, "")
sub(/\*\//, "")
print "# " $0
}
else
{
getline
do
{
print "#" $0
getline
} while ($0 !~ /^\*\//);
}
}
else
print
}